import request from '@/utils/request'

// 统一前缀
var prefix = '/documentService'

// 获取文档列表
export function lookDocuments(params) {
  return request({
    url: `${prefix}/document/list`,
    method: 'get',
    params: params,
  })
}

// 添加一个文档
export function addOneDocument(data) {
  return request({
    url: `${prefix}/document`,
    method: 'post',
    data: data,
  })
}

// 更新一个文档
export function updateOneDocument(data) {
  return request({
    url: `${prefix}/document`,
    method: 'put',
    data: data,
  })
}

// 删除文档
export function deleteDocuments(ids) {
  return request({
    url: `${prefix}/document`,
    method: 'delete',
    data: ids,
  })
}
